﻿CREATE FUNCTION [dbo].[NextTrackerStatuses]
(@TrackerID varchar(11),@Direction int = 0)
RETURNS TABLE
AS
RETURN(
SELECT s.* FROM t_Tracker t CROSS APPLY NextMenus(StatusID,@Direction) s WHERE t.ID = @TrackerID
)
